#ifndef CSE168_AASQUARE_H_INCLUDED
#define CSE168_AASQUARE_H_INCLUDED

#include "Vector3.h"
#include "Object.h"

class AASquare : public Object
{
public:
    AASquare();
    virtual ~AASquare();

    void setCenter(const Vector3& v)    {m_center = v;}
    void setWidth(const float f)       {m_width = f;}

    const Vector3& center() const       {return m_center;}
    float width() const                {return m_width;}

    virtual void renderGL();
	virtual void preCalc();
    virtual bool intersect(HitInfo& result, const Ray& ray,
                           float tMin = 0.0f, float tMax = MIRO_TMAX);

protected:
    Vector3 m_center;
    float m_width;
};

#endif // CSE168_AASQUARE_H_INCLUDED
